//*****************************************************************
// ControlThread.cpp
//
//  Created on: Jan 21, 2012
//      Author: Christopher Wood
//              Robert Livosi
//
//  $Id: ControlThread.cpp 23 2012-01-28 02:51:05Z caw4567@gmail.com $
//*****************************************************************

#include "ControlThread.h"

/**
 * Default constructor that sets the transform and I/O threads.
 *
 * @param tThread - the desired transform thread to control.
 * @param ioGroup - the I/O group that is managed.
 */
ControlThread::ControlThread(TransformThread* tThread, IOThreadGroup* ioGroup)
{
	this->transformer = tThread;
	this->ioGroup = ioGroup;
	this->controlComplete = false;
}

/**
 * Default destructor.
 */
ControlThread::~ControlThread()
{
}

/**
 * Retrieve the transform object being controlled by this thread.
 *
 * @return a pointer to the transform thread object
 */
TransformThread* ControlThread::getTransformer()
{
	return transformer;
}

/**
 * Retrieve a pointer to the IOThreadGroup object being controlled by this thread.
 *
 * @param a pointer to the IOThreadGroup object.
 */
IOThreadGroup* ControlThread::getIOThreadGroup()
{
	return ioGroup;
}

/**
 * Determine if this thread is done controlling the others.
 *
 * @return true if done, false otherwise.
 */
bool ControlThread::isComplete()
{
	return controlComplete;
}

/**
 * Set the control completion status.
 *
 * @param b - new boolean value.
 */
void ControlThread::setComplete(bool b)
{
	controlComplete = b;
}
